{%- extends "base.html" %}
{%- import "bootstrap/wtf.html" as wtf %}
{% import "main/_macro.html" as macro %}
{%- block title %}主页{%- endblock %}
{% block scripts %}
    {{ super() }}
    {{ pagedown.include_pagedown() }}
{% endblock %}
{%- block content %}
    {% if current_user.is_authenticated %}
        <div style="padding:10px 20px">
            {% if current_user.can(Permission.WRITE_ARTICLES) %}
                <div>
                    {{ wtf.quick_form(form) }}
                </div>
            {% endif %}
            {% include 'main/_posts.html' %}
            <div class="pagination" style="width:100%;text-align:center">
                {{ macro.pagination_widget(pagination, '.index') }}
            </div>
        </div>
    {% endif %}
{%- endblock %}
